import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/home'
import Layout from '@/components/layout'
import ArtList from '@/components/artList'
import ArtDetails from '@/components/artDetails'
import History from '@/components/history'
import About from '@/components/about'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: '/client',  // 基础路径
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/layout',
      name: 'layout',
      component: Layout,
      children: [{
        path: '/artList',
        name: 'artList',
        component: ArtList
      }, {
        path: '/artDetails',
        name: 'artDetails',
        component: ArtDetails
      }, {
        path: '/history',
        name: 'history',
        component: History
      }, {
        path: '/about',
        name: 'about',
        component: About
      }]
    },
  ]
})
